# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=fssb
pkgver=73.51d2ac2
pkgrel=1
pkgdesc='A low-level filesystem sandbox for Linux using syscall intercepts.'
groups=('blackarch' 'blackarch-defensive')
arch=('x86_64' 'aarch64')
url='https://github.com/adtac/fssb'
license=('GPL3')
depends=('openssl')
makedepends=('git')
source=("git+https://github.com/adtac/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname/tests"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/tests" tests/*
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

